package com.cy.pj.sys;

import com.cy.pj.sys.dao.SysNoticeDao;
import com.cy.pj.sys.pojo.SysNotice;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import javax.annotation.Resources;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository("sysNoticeDaoImpl")
public class SysNoticeDaoImpl implements SysNoticeDao {


    @Autowired
    private SqlSession sqlSession;

    @Override
    public List<SysNotice> selectNotice(SysNotice notice) {


        String s=this.getClass().getInterfaces()[0].getName();
        String statement=s+".selectNotice";
        List<SysNotice> list=sqlSession.selectList(statement,notice);


        return list;
    }

    @Override
    public int deleteById(Long... id) {
        return 0;
    }

    @Override
    public SysNotice selectById(Long id) {
        return null;
    }

    @Override
    public int insertNotice(SysNotice notice) {
        return 0;
    }

    @Override
    public int updateNotice(SysNotice notice) {
        return 0;
    }
}
